﻿using SuperSocket.SocketBase;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ServerHall
{
	class Program
	{
		static void Main(string[] args)
		{
			var appServer = new AppServer();

			int port = 2012;
			//Setup the appServer
			if (!appServer.Setup(port)) //Setup with listening port
			{
				Console.WriteLine("Failed to setup!");
				Console.ReadKey();
				return;
			}

			Console.WriteLine();

			//Try to start the appServer
			if (!appServer.Start())
			{
				Console.WriteLine("Failed to start!");
				Console.ReadKey();
				return;
			}

			Console.WriteLine($"端口：{port}，服务器启动成功，按任意键退出");

			
			Console.ReadKey();
		}
	}
}
